home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1 / Ian and Stuart's One (Australia).iso / Australasian Legends / Commercial / Rainbow Hill / MacDOS™ 2.0.0 / batches / move.bat < prev    next >
DOS Batch File  |  1994-06-30  |  705b  |  27 lines

  1. @echo off
  2. !  move.bat    Batch file to move a folder or a file to a folder
  3. !
  4. !  move name [dest]
  5. !
  6. !  where 'name' is the item to be moved and 'dest' is the folder which
  7. !  shall contain 'name'. Both names can be preceded by paths and volume IDs.
  8. !  If 'dest' is missing, the current directory is used as destination.
  9. !
  10. !  move.bat executes movefile and movedir
  11. !
  12. !  Copyright © 1994 by Rainbow Hill Pty Ltd. All rights reserved.
  13. !
  14.  
  15.     ! ensure that the first parameter is there and that the third one is not
  16.     set doserr=13
  17.     if not "%3 " == " " goto ERR_LBL
  18.     if "%1 " == " " goto ERR_LBL
  19.  
  20.     ! do the moving
  21.     if existdir "%1" movedir "%1" "%2"
  22.     movefile "%1" "%2"
  23.     ! it never returns
  24.  
  25. :ERR_LBL
  26.     show %doserr%
  27.